package com.hongyun.tms.common.dto.mstaff;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 船舶费率 新增或修改参数
 *
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
public class MStaffSaveReqDto implements Serializable {

    @ApiModelProperty(value = "主键ID")
    private Long id;


    @ApiModelProperty(value = "拖轮id")
    @NotNull(message = "请选择所属拖轮")
    private Long tugId;

    @ApiModelProperty(value = "员工编号")
    @NotBlank(message = "员工编号不能为空")
    @Size(max = 25, min = 1, message = "员工编号长度需要在1-25个字符之间")
    private String staffNo;

    @ApiModelProperty(value = "员工姓名")
    @NotBlank(message = "员工姓名不能为空")
    @Size(max = 10, min = 1, message = "员工姓名长度可输入1-10个字符")
    private String staffName;

    @ApiModelProperty(value = "性别，字典（0女1男）")
    @NotBlank(message = "性别不能为空")
    @Size(max = 4, min = 1, message = "性别可输入1-4个字符")
    private String sex;

    @ApiModelProperty(value = "生日")
    private String birthDay;

    @ApiModelProperty(value = "所属部门ID")
    @NotNull(message = "部门ID不能为空")
    private Long deptId;

    @ApiModelProperty(value = "所属部门")
    @NotBlank(message = "所属部门不能为空")
    private String deptName;

    @ApiModelProperty(value = "入职日期")
    private String entryDate;

    @ApiModelProperty(value = "岗位代码，字典")
    private String postCode;

    @ApiModelProperty(value = "岗位名称")
    private String postName;

    @ApiModelProperty(value = "0在职1离职")
    @NotNull(message = "在职状态不能为空")
    private Integer status;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "劳务公司代码，字典")
    private String companyCode;

    @ApiModelProperty(value = "劳务公司名称")
    @NotBlank(message = "劳务公司名称不能为空")
    private String companyName;

    @ApiModelProperty(value = "是否船员，0否1是")
    private String isCrew;

    @ApiModelProperty(value = "是否驾驶员，0否1是")
    private String isDriver;

    @ApiModelProperty(value = "是否引水员，0否1是")
    private String isPilot;

    @ApiModelProperty(value = "离职月数")
    @Min(value = 0, message = "离职月数不能小于0")
    @Max(value = 999, message = "离职月数不能超过999个月")
    private Integer departMonth;

    @ApiModelProperty(value = "船员系数")
    @NotNull(message = "船员系数不能为空")
    @DecimalMax(value = "999.99", message = "船员系数不能超过999.99")
    @DecimalMin(value = "0", message = "船员系数不能小于0")
    private BigDecimal crewRate;
}

